package com.jf.docsify.common.init.db;

import java.util.List;

import com.jf.docsify.common.annotation.DbType;
import com.jf.docsify.common.enums.EnumDbType;

@DbType(EnumDbType.MYSQL)
public class MysqlDbInit extends DbInitBaseService implements DbInitService {


    @Override
    protected void init() {

        createTable();

    }

    @Override
    protected String formatUrl(String url) {
        return url;
    }

    @Override
    protected String sqlScriptName() {
        return "init/db/docsify.sql";
    }

    @Override
    protected List<String> showTables() {
        return execSqlCommand("show tables");
    }

    @Override
    protected String driver() {
        return "com.mysql.jdbc.Driver";
    }
}
